package complex;

import basic.DbConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("application_complex.xml");
        UserService userService = context.getBean("userService", UserService.class);
        userService.insert();


        //直接实例化UserServiceImpl对象不会自动的注入dao
        //new UserServiceImpl().insert();

    }
}
